package  com.greensoftcodeplus.redislog.utils;

import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.Map;

public class ResolvingArgsHash {

    public static String ResolvingArgs(Object o) {
        String ret = "";
        Object object = null;
        try {
            //HMSET
            if (o instanceof LinkedHashMap) {
                String jsonParam = "";
//                    "k1" "\"v1\"" "k2" "\"v2\""
                LinkedHashMap listMap = (LinkedHashMap) o;
                Iterator it = listMap.entrySet().iterator();
                while (it.hasNext()) {
                    Map.Entry entry = (Map.Entry) it.next();
                    ret += ResolvingFun.UnSerializeSimpleParam(entry.getKey()) + " " + ResolvingFun.UnSerializeSimpleParam(entry.getValue()) + " ";
                }
            }


        } catch (Exception e) {
            ret = "";
        }

        return ret;
    }
}
